Draft PR for the NYX compliance changes#360
Draft PR for the NYX compliance changes#360mskinner5278 wants to merge 27 commits intoNSLS2:masterfrom
Conversation
* thank you jun for this suggestion
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
JunAishima
left a comment
There was a problem hiding this comment.
the code as it is cannot run on AMX/FMX without changing functionality drastically.
there is more wiggle room with the GUI, so would recommend working with beamline staff to see which of the current NYX changes are actually desirable for AMX/FMX as well.
| xMotAbsoluteMove, xEnd, yMotAbsoluteMove, yEnd, zMotAbsoluteMove, zEnd = raster_positions(row, stepsize, omegaRad, rasterStartX, rasterStartY, rasterStartZ, row_index) | ||
| vector = {'x': (xMotAbsoluteMove, xEnd), 'y': (yMotAbsoluteMove, yEnd), 'z': (zMotAbsoluteMove, zEnd)} | ||
| logger.info(f'starting new row: {row_index}') | ||
| zMotAbsoluteMove, zEnd, yMotAbsoluteMove, yEnd, xMotAbsoluteMove, xEnd = raster_positions(row, stepsize, omegaRad+90, rasterStartZ*1000, rasterStartY*1000, rasterStartX*1000, row_index) |
There was a problem hiding this comment.
these factors of 1000 cannot stay. can't you refine or make alternative PVs for sample centering-related PVs that would enable you to keep the current values and the same names of the objects to be moved?
| initiate transitions here allows for GUI sample/heat map image to update | ||
| after moving to known position""" | ||
| logger.debug(f'lastOnSample(): {lastOnSample()} autoRasterFlag: {autoRasterFlag}') | ||
| yield from bps.sleep(3) #waiting for detector to not lose row |
There was a problem hiding this comment.
this would be a major problem for the other beamlines, where this sleep isn't necessary
| multiColThreshold = reqObj["diffCutoff"] | ||
| gotoMaxRaster(rasterResult,multiColThreshold=multiColThreshold) | ||
| multiColThreshold = reqObj["diffCutoff"] | ||
| # gotoMaxRaster(rasterResult,multiColThreshold=multiColThreshold) |
There was a problem hiding this comment.
calls to other code can't just be removed. make a config variable or something that enables you to make NYX work with your code while AMX/FMX use the gotoMaxRaster() function
| print('clean up files') | ||
| clean_up_files(pic_prefix, output_file) | ||
| zebraCamDaq(0,360,40,.4,pic_prefix,getBlConfig("visitDirectory"),0) | ||
| #TODO: if daq_utils.beamline=='nyx': |
There was a problem hiding this comment.
make sure that the AMX/FMX code works for them
|
|
||
| arm_status = SubscriptionStatus(flyer.detector.cam.armed, armed_callback, run=False) | ||
|
|
||
| flyer.detector.cam.acquire.put(1) |
There was a problem hiding this comment.
shouldn't this acquire be done after the detector is armed?
| @@ -28,12 +28,9 @@ | |||
| logging.getLogger('ophyd').setLevel(logging.WARN) | |||
| logging.getLogger('caproto').setLevel(logging.WARN) | |||
| handler1 = handlers.RotatingFileHandler('lsdcServerLog.txt', maxBytes=5000000, backupCount=100) | |||
There was a problem hiding this comment.
again, differences cannot be completely removed.
| PINS_PER_PUCK = 16 | ||
|
|
||
| DETECTOR_OBJECT_TYPE_LSDC = "lsdc" # using det_lib | ||
| DETECTOR_OBJECT_TYPE_NO_INIT = "no init" # skip epics detector init |
There was a problem hiding this comment.
is there any reason why you couldn't use DETECTOR_OBJECT_TYPE_OPHYD?
| self.exp_time_ledit.textChanged.connect(self.checkEntryState) | ||
| hBoxColParams2.addWidget(colRangeLabel) | ||
| hBoxColParams2.addWidget(self.osc_range_ledit) | ||
| #hBoxColParams2.addWidget(colRangeLabel) |
There was a problem hiding this comment.
a lot of GUI code is just changed without any recourse to it being shown on AMX/FMX.
if you really want to have this pull request merged, please go over with beamline staff the changes you have made while showing the existing AMX/FMX GUI, and see where they agree with changes. otherwise, the changes that AMX/FMX do not want must be rolled back.
| def screenXPixels2microns(self, pixels): | ||
| fov = self.getCurrentFOV() | ||
| fovX = fov["x"] | ||
| fovX = fov["x"]*1000 |
There was a problem hiding this comment.
these factors of 1000 must again be removed from the common code
| return False | ||
| if daq_utils.getBlConfig("visitDirectory") != os.getcwd(): | ||
| check_working_directory.remediation = ("Working directory mismatch. Please start LSDC GUI in the same folder as the server is running.") | ||
| check_working_directory.remediation = (f"Working directory mismatch. Please start LSDC GUI in the same folder as the server is running.") |
There was a problem hiding this comment.
f not necessary for this string
These are all the changes that were made prior to the MD2 integration. Many of these changes were made to meet the compliance requirements that were added during the cycle, and many are invalidated by the MD2 integration and ophydization that occurs later.